home *** CD-ROM | disk | FTP | other *** search
/ Macworld Expo - Develope…Central & Net Innovations / Developer Central and Net Innovators (MacWorld Expo) (January 1999).iso / Developer Central / Bowers Development / Demo AppMaker / Examples / C⁄C++ OS8 / AMReminder / DDocData.cp < prev    next >
Encoding:
Text File  |  1998-10-17  |  1.1 KB  |  81 lines  |  [TEXT/CWIE]

  1. // DDocData.cp -- data container class for AMReminder
  2.  
  3. #include "AMEngine.h"
  4. #include "PString.h"
  5. #include "DDocData.h"
  6.  
  7.  
  8. //----------
  9. DDocData::DDocData ()
  10. {
  11.     mReminderChoice = -1;
  12. }
  13.  
  14. //----------
  15. DDocData::~DDocData ()
  16. {
  17. }
  18.  
  19. //----------
  20. void    DDocData::CopyFrom (
  21.     const DDocData&        inOther)
  22. {
  23.     mReminderChoice = inOther.mReminderChoice;
  24.     // mReminders = inOther.mReminders;
  25. }
  26.  
  27. //----------
  28. void    DDocData::ReadFromFile (
  29.     AMEngine*        engine)
  30. {
  31.     mReminders.ReadFromFile (engine);
  32. }
  33.  
  34. //----------
  35. void    DDocData::WriteToFile (
  36.     AMEngine*        engine)
  37. {
  38.     mReminders.WriteToFile (engine);
  39. }
  40.  
  41.  
  42. //----------
  43. SInt16        DDocData::GetReminderChoice () const
  44. {
  45.  
  46.     return mReminderChoice;
  47. }
  48.  
  49. //----------
  50. void    DDocData::SetReminderChoice (
  51.     SInt16        inValue)
  52. {
  53.     mReminderChoice = inValue;
  54.         SignalDataChanged (idIsSelected);
  55.  
  56.     SignalDataChanged (idReminderChoice);
  57. }
  58.  
  59. //----------
  60. TAMArray<DReminder>*        DDocData::GetReminders ()
  61. {
  62.  
  63.     return &mReminders;
  64. }
  65.  
  66.  
  67. //----------
  68. Boolean        DDocData::GetIsSelected () const
  69. {
  70.     return (mReminderChoice >= 0);
  71.  
  72. }
  73.  
  74. //----------
  75. void    DDocData::SetIsSelected (
  76.     Boolean        inValue)
  77. {
  78.  
  79.     SignalDataChanged (idIsSelected);
  80. }
  81.